CC = arm-apple-darwin-cc 
LD = $(CC)

LDFLAGS = 	-lobjc \
			-framework CoreFoundation \
			-framework Foundation \
			-framework UIKit \
			-framework LayerKit \
			-framework CoreGraphics \
			-framework GraphicsServices \
			-framework CoreSurface \
         	-framework CoreAudio

all:		FiveDice

FiveDice:	main.o \
			FiveDiceController.o \
			FiveDiceDefaultsController.o \
			Dice.o \
			
			$(LD) $(LDFLAGS) -v -o $@ $^ 
			
%.o:    %.m 
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

%.m:    %.h


clean:
		rm -rf *.o *~ FiveDice FiveDice.app
		
package: FiveDice
	rm -fr FiveDice.app
	mkdir -p FiveDice.app
	cp FiveDice FiveDice.app/FiveDice
	cp Info.plist FiveDice.app/Info.plist
	cp icon.png FiveDice.app/icon.png
	cp Default.png FiveDice.app/Default.png
	cp PkgInfo FiveDice.app/PkgInfo
	cp greenfelt.png FiveDice.app/greenfelt.png
	cp one.png FiveDice.app/one.png
	cp two.png FiveDice.app/two.png
	cp three.png FiveDice.app/three.png
	cp four.png FiveDice.app/four.png
	cp five.png FiveDice.app/five.png
	cp six.png FiveDice.app/six.png
	cp one_d.png FiveDice.app/one_d.png
	cp two_d.png FiveDice.app/two_d.png
	cp three_d.png FiveDice.app/three_d.png
	cp four_d.png FiveDice.app/four_d.png
	cp five_d.png FiveDice.app/five_d.png
	cp six_d.png FiveDice.app/six_d.png
	cp navbar.png FiveDice.app/navbar.png
	cp bottombar.png FiveDice.app/bottombar.png
	cp scorecard.png FiveDice.app/scorecard.png
	cp ones.png FiveDice.app/ones.png
	cp twos.png FiveDice.app/twos.png
	cp threes.png FiveDice.app/threes.png
	cp fours.png FiveDice.app/fours.png
	cp fives.png FiveDice.app/fives.png
	cp sixes.png FiveDice.app/sixes.png
	cp 3ofakind.png FiveDice.app/3ofakind.png
	cp 4ofakind.png FiveDice.app/4ofakind.png
	cp fullhouse.png FiveDice.app/fullhouse.png
	cp smstraight.png FiveDice.app/smstraight.png
	cp lgstraight.png FiveDice.app/lgstraight.png
	cp yahtzee.png FiveDice.app/yahtzee.png
